package com.situ.mall.controller;

import com.situ.mall.pojo.vo.CategoryCountVO;
import com.situ.mall.service.ICategoryService;
import com.situ.mall.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/echarts")
public class EChartsController {
    @Autowired
    private ICategoryService categoryService;

    @RequestMapping("/selectCategoryCount")
    public Result<List<CategoryCountVO>> selectCategoryCount() {
        List<CategoryCountVO> list = categoryService.selectCategoryCount();
        return Result.ok(list);
    }

}
